using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BHXH.Core.Domain;
using BHXH.Core.IService;
using FX.Data;
using NHibernate;

namespace BHXH.Core.ServiceImp
{
    public class hosoService : BaseService<hoso, int>, IhosoService
    {
        ISession mySession;
        public hosoService(string sessionFactoryConfigPath)
            : base(sessionFactoryConfigPath)
        { }

        
        public IList<hoso> layTatCaHoSo_DKBHXH_101()
        {
            using (mySession = this.NHibernateSession.SessionFactory.OpenSession())
            {
                IList<hoso> a = mySession.CreateQuery("FROM hoso as hs where hs.LoaiVanBan = 101 order by ThuTu Asc").List<hoso>();
                return a;
            }
        }

        public IList<hoso> layTatCaHoSo_ThuBHXH_103()
        {
            using (mySession = this.NHibernateSession.SessionFactory.OpenSession())
            {
                IList<hoso> a = mySession.CreateQuery("FROM hoso as hs where hs.LoaiVanBan = 103 order by ThuTu Asc").List<hoso>();
                return a;
            }
        }
    }

}